package com.ampaiva.db;

import java.util.List;

import com.ampaiva.pattern.Child;

public class DatabaseInfo {
    String name;
    private Child<DatabaseInfo, TableInfo> tablesInfo;

    public DatabaseInfo(String databaseName, List<TableInfo> tablesInfo) {
        this.name = databaseName;
        this.setTablesInfo(new Child<DatabaseInfo, TableInfo>(this, tablesInfo));
    }

    @Override
    public String toString() {
        return name + getTablesInfo();
    }

    public Child<DatabaseInfo, TableInfo> getTablesInfo() {
        return tablesInfo;
    }

    private void setTablesInfo(Child<DatabaseInfo, TableInfo> tablesInfo) {
        this.tablesInfo = tablesInfo;
    }

}
